#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    vector<vector<int>> ret;
    vector<int> path;
    vector<vector<int>> subsets(vector<int>& nums) {
        int n = 0;
        dfs(nums, n);
        return ret;
    }
    void dfs(vector<int>& nums, int n)
    {
        ret.push_back(path);

        for (int i = n; i < nums.size(); i++)
        {
            path.push_back(nums[i]);
            dfs(nums, i + 1);
            path.pop_back();
        }
    }
};